﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace BookShop3Tables.Models
{
    public class Book
    {
        public int BookID { get; set; }
        public int CategoryID { get; set; }
        public int PersonID { get; set; }
        public string Name { get; set; }
        public string Saga { get; set; }

        [DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
        public DateTime ReleaseDate { get; set; }

        public decimal Price { get; set; }        
        public virtual Author Author { get; set; }
        public virtual Category Category { get; set; }
    }
}